package com.eorchis.module.sysdeptuser.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.eorchis.core.basedao.dao.IDaoSupport;
import com.eorchis.core.basedao.entity.IBaseEntity;
import com.eorchis.core.service.impl.AbstractBaseService;
import com.eorchis.core.ui.commond.ICommond;
import com.eorchis.module.sysdeptuser.dao.ISysDeptUserDao;
import com.eorchis.module.sysdeptuser.service.ISysDeptUserService;
import com.eorchis.module.sysdeptuser.ui.commond.SysDeptUserQueryCommond;

/**
 * Title: SysDeptUserServiceImpl<br>
 * Description: 同步部门人员业务接口实现<br>
 * Copyright @ 2011~2016 Goldgov .All rights reserved.<br>
 * @author LongJZ
 * @createDate 2016-1-7
 * @version $Revision: $
 */
@Service(value = "com.eorchis.module.sysdeptuser.service.impl.SysDeptUserServiceImpl")
public class SysDeptUserServiceImpl extends AbstractBaseService implements ISysDeptUserService {

	@Resource(name = "com.eorchis.module.sysdeptuser.dao.impl.SysDeptUserDaoImpl")
	private ISysDeptUserDao sysDeptUserdao;

	@Override
	public IDaoSupport getDaoSupport() {
		return sysDeptUserdao;
	}

	/**
	 * 同步当前管理范围下的部门人员及关联关系
	 * @param queryCommond
	 * @return
	 * @author LongJZ
	 * @date 2016-1-7
	 */
	public Boolean sysDeptUser(final SysDeptUserQueryCommond queryCommond) throws Exception {
		return sysDeptUserdao.sysDeptUser(queryCommond);
	}

	/**
	 * 初始化临时用户
	 * @param queryCommond
	 * @return
	 * @author LongJZ
	 * @date 2016-1-13
	 */
	public Boolean cleanTempUser(final SysDeptUserQueryCommond queryCommond) throws Exception {
		return sysDeptUserdao.cleanTempUser(queryCommond);
	}

	@Override
	public <C extends ICommond> C toCommond(IBaseEntity arg0) {
		// TODO Auto-generated method stub
		return null;
	}
}
